#include "stdafx.h"
#include "ExtendedString.h"

ExtendedString::ExtendedString()
{

}

ExtendedString::ExtendedString(const std::string& aString)
:myString(aString)
{

}

ExtendedString::ExtendedString(const char* aString)
:myString(aString)
{

}

ExtendedString::ExtendedString(const ExtendedString& aString)
:myString(aString.myString)
{

}

ExtendedString& ExtendedString::operator=(const ExtendedString& aString)
{
	myString = aString.myString;
	return *this;
}

ExtendedString& ExtendedString::operator+=(const ExtendedString& aString)
{
	myString += aString.myString;
	return *this;
}

ExtendedString::operator std::string() const
{
	return myString;
}

const char* ExtendedString::c_str() const
{
	return myString.c_str();
}

ExtendedString& ExtendedString::operator<<(const std::string aString)
{
	myString += aString;
	return *this;
}

ExtendedString& ExtendedString::operator<<(const char* aString)
{
	myString += aString;
	return *this;
}

ExtendedString& ExtendedString::operator<<(const long aValue)
{
	char buffer[50];
	_ltoa_s(aValue, buffer, 50, 10);
	myString += buffer;
	return *this;
}